<template>
  <div class="addOrEditCirleFriend">
    <div class="header-top">
      <div class="head-title" @click="gotoPage()">
        <i class="el-icon-back"></i>屏蔽设置
      </div>
    </div>
    <div class="content-main">
      <div class="title">屏蔽对象<span>被屏蔽对象的所有消息都不会检测敏感词，此处设置所有监控的企微号生效</span></div>
      <div class="group-btn">
        <el-dropdown style="margin-right: 10px">
          <el-button type="primary" plain>
            <i class="el-icon-plus"></i>选择客户
          </el-button>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item>从好友添加</el-dropdown-item>
            <el-dropdown-item>从群成员添加</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
        <el-button  type="primary" plain>选择客户群</el-button>
      </div>
      <div class="userList">

      </div>
    </div>
    <div class="content-main">
      <div class="title">本企业员工消息</div>
      <el-radio-group v-model="form.value">
        <el-radio :label="item.value" v-for="(item,index) in typeList">{{item.label}}</el-radio>
      </el-radio-group>
    </div>
    <div class="content-main">
      <div class="title">白名单成员消息</div>
      <el-radio-group v-model="form.value">
        <el-radio :label="item.value" v-for="(item,index) in typeList">{{item.label}}</el-radio>
      </el-radio-group>
    </div>
    <div class="footer-btn">
      <el-button @click="handleCloseDialog">取消</el-button>
      <el-button type="primary" @click="onSubmit('form')">提交并发送</el-button>
    </div>
<!--&lt;!&ndash;    添加链接&ndash;&gt;-->
<!--    <ReplyLink v-if="showReplyLink" :visableIf.sync="showReplyLink"></ReplyLink>-->
<!--&lt;!&ndash;    选择企微号&ndash;&gt;-->
<!--    <selectByUser v-if="showSelectByUser" :visableIf.sync="showSelectByUser"></selectByUser>-->
  </div>
</template>

<script>
// 引入样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import {quillEditor, Quill} from 'vue-quill-editor';
import quillEmoji from 'quill-emoji'
import 'quill-emoji/dist/quill-emoji.css'

Quill.register('modules/quillEmoji', quillEmoji)
import VideoUpload from "@/components/VideoUpload/index";

export default {
  name: 'blockSettings',
  components: {
    // quillEditor,
    // VideoUpload,
    // 'ReplyLink': () => import('./ReplyLink.vue'),//导出弹窗
    // 'selectByUser': () => import('./selectByUser.vue'),//导出弹窗
    // 'MultipleSelect': () => import('@/views/components/multipleSelect.vue'),//导出弹窗
    // 'viewConditions': () => import('./viewConditions.vue'),//导出弹窗
  },
  data() {
    return {
      typeList:[
        {
          value:1,
          label:'不检测敏感词',
        },
        {
          value:2,
          label:'检测敏感词',
        }
      ],
      form:{

      },
      rules: {
        'basicInfo.taskName': [
          {required: true, message: '请输入任务名称', trigger: 'blur'}
        ],
        'basicInfo.groupInfo': [
          {required: true, message: '请选择分组', trigger: 'blur'}
        ],
        'basicInfo.groupInfo.enterpriseInfo.ids': [
          {required: true, message: '请选择下发的企微号', trigger: 'blur'}
        ],
        'basicInfo.groupInfo.enterpriseInfo.useType': [
          {required: true, message: '请选择客户范围', trigger: 'blur'}
        ],

      },
    }
  },
  created() {
  },
  mounted() {
  },
  watch: {},
  methods: {
    onSubmit(formName) {
      //提交的代码
      this.$refs[formName].validate((valid) => {
        if (valid) {
          console.log('提交表单');
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
    gotoPage() {
      // this.$router.push({
      //   name: 'sensitiveControlMgt',
      // })
      this.$router.back()
    },
    handleCloseDialog() {
      this.$emit('update:visableIf', false);
      this.$emit('handleQuery');
    }
  }
}
</script>

<style scoped lang="scss">
.header-top {
  height: 46px;
  background: #fff;
  border-bottom: 1px solid #e9e9e9;
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 20px;

  .head-title {
    font-size: 14px;
    line-height: 22px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    font-weight: bold;

    i {
      font-size: 20px;
      font-weight: bold;
      cursor: pointer;
      margin-right: 10px;
    }
  }

}
.footer-btn {
  position: absolute;
  left: 0px;
  right: 0px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.content-main {
  background: #fff;
  border-radius: 4px;
  padding: 16px;
  margin: 16px;
}
.title{
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  span {
    font-size: 12px;
    font-weight: 400;
  }
}
</style>
